//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.hustcad.plm.pdm.ec.controller;

import com.alibaba.fastjson.JSON;
import com.hustcad.plm.basic.dto.TyplmCommonQueryDTO;
import com.hustcad.plm.basic.log.LogEventEnum;
import com.hustcad.plm.basic.log.TyplmLogger;
import com.hustcad.plm.pdm.audit.util.TyplmAuditLogUtil;
import com.hustcad.plm.pdm.ec.module.dto.AffectedObjectDTO;
import com.hustcad.plm.pdm.ec.module.dto.AffectedParamDTO;
import com.hustcad.plm.pdm.ec.module.dto.ECLinkParamDTO;
import com.hustcad.plm.pdm.ec.module.dto.TyplmChangeRequestDTO;
import com.hustcad.plm.pdm.ec.module.query.TyplmChangeObjectDataVO;
import com.hustcad.plm.pdm.ec.module.vo.ChangeEcDataVO;
import com.hustcad.plm.pdm.ec.module.vo.ChgFormVO;
import com.hustcad.plm.pdm.ec.module.vo.ChgRequestDetailVO;
import com.hustcad.plm.pdm.ec.module.vo.ECCommonVO;
import com.hustcad.plm.pdm.ec.module.vo.ECLinkObjDataCommonVO;
import com.hustcad.plm.pdm.ec.service.*;
import com.hustcad.plm.pdm.type.service.TyplmTypeService;
import com.jsyxdl.utils.FormTemplateAndDataUtils;
import com.ty.basic.entity.CTyEntityBaseDO;
import com.ty.basic.entity.IdentifierEntity;
import com.ty.basic.entity.audit.AuditLogDO;
import com.ty.basic.response.ResponseResult;
import com.ty.basic.utils.ArgumentUtils;
import com.ty.security.util.TyCommonUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;

@Api(
        tags = {"变更管理"}
)
@RestController
@RequestMapping({"/rest/v1/change"})
public class TyplmChangeController {
    private static final Logger log = LoggerFactory.getLogger(TyplmChangeController.class);
    @Resource
    private TyplmChgReqRelDataLinkService typlmChgReqRelDataLinkService;
    @Resource
    private TyplmChangeIssueService typlmChangeIssueService;
    @Resource
    private TyplmLogger typlmLogger;
    @Resource
    private TyplmChangeRequestService typlmChangeRequestService;
    @Resource
    private TyplmChangeNoticeService typlmChangeNoticeService;
    @Resource
    private TyplmEcAgainstDataService typlmEcAgainstDataService;
    @Resource
    private TyplmChangeEcEndItemLinkService typlmChangeEcEndItemLinkService;
    @Resource
    private TyplmEngineeringChangeService typlmEngineeringChangeService;
    @Resource
    private TyplmTypeService typlmTypeService;





    private static final String CTY_ISSUE_REPORT_OTYPE = "IssueReport";
    private static final String MAIN_OBJ = "mainObj";
    private static final String OBJECT_LIST = "objectList";

    public TyplmChangeController() {
    }

    @PostMapping({"/batchQueryEntityInChange"})
    @ApiOperation(
            value = "批量查询对象是否在变更中（仅用于状态的查询显示不作为是否能添加到变更单的依据）",
            notes = "批量查询对象是否在变更中",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<Map<IdentifierEntity, Boolean>> batchQueryEntityInChange(@RequestBody List<IdentifierEntity> identifierEntityList) {
        Map<IdentifierEntity, Boolean> changeMap = this.typlmChgReqRelDataLinkService.batchQueryEntityInChange(identifierEntityList);
        return ResponseResult.success(changeMap);
    }

    @PostMapping({"/createChangeRequest"})
    @ApiOperation(
            value = "创建变更请求",
            notes = "创建变更请求",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<ChgRequestDetailVO> createChangeRequest(MultipartFile[] fileList, HttpServletRequest request) {
        String changeRequestJSON = request.getParameter("changeRequestDTO");
        TyplmChangeRequestDTO changeRequestDTO = (TyplmChangeRequestDTO)JSON.parseObject(changeRequestJSON, TyplmChangeRequestDTO.class);
        ArgumentUtils.checkArgumentNull(changeRequestDTO, "changeRequestDTO");
        ArgumentUtils.checkArgumentBlank(changeRequestDTO.getName(), "name");
        LinkedList<MultipartFile> fileLinkedList = ObjectUtils.isEmpty(fileList) ? new LinkedList() : (LinkedList)Arrays.stream(fileList).collect(Collectors.toCollection(LinkedList::new));
        changeRequestDTO.setFileList(fileLinkedList);

        try {
            ChgRequestDetailVO changeRequest = this.typlmChangeRequestService.createChangeRequest(changeRequestDTO);
            if (Objects.nonNull(changeRequest)) {
                this.typlmLogger.info(changeRequest, LogEventEnum.CRATE_OBJECT);
            }

            return ResponseResult.success(changeRequest);
        } catch (Exception var8) {
            AuditLogDO auditLogDO = new AuditLogDO();
            auditLogDO.setObjoid(BigInteger.ZERO);
            auditLogDO.setObjotype(changeRequestDTO.getOtype());
            auditLogDO.setContaineroid(changeRequestDTO.getContaineroid());
            auditLogDO.setContainerotype(changeRequestDTO.getContainerotype());
            auditLogDO.setTargettype(changeRequestDTO.getTypeDefName());
            auditLogDO.setTargetname(changeRequestDTO.getName());
            auditLogDO.setTargetnumber(changeRequestDTO.getObjectNumber());
            auditLogDO.setTargetsecuritylabels(changeRequestDTO.getSecuritylabels());
            auditLogDO.setLifecyclestageotype(changeRequestDTO.getLifecyclestageotype());
            auditLogDO.setLifecyclestageoid(changeRequestDTO.getLifecyclestageoid());
            auditLogDO.setLifecyclestatekey(changeRequestDTO.getLifecyclestagekey());
            this.typlmLogger.errorInfo(LogEventEnum.CRATE_OBJECT, auditLogDO, var8);
            throw var8;
        }
    }

    @PostMapping({"/createChangeNotice"})
    @ApiOperation(
            value = "创建变更单/发布单",
            notes = "创建变更单/发布单",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<ChgFormVO> createChangeNotice(List<MultipartFile> fileList, HttpServletRequest request) {
        String params = (String)TyCommonUtils.requireNonNull(request.getParameter("params"), "params");

        LinkedHashMap<String, String> descriptionMap = (LinkedHashMap)JSON.parseObject(request.getParameter("descriptionMap"), LinkedHashMap.class);
        ChgFormVO formVO = (ChgFormVO)JSON.parseObject(params, ChgFormVO.class);

//        FormTemplateAndDataUtils.createChangeNoticeByFormData(formVO);

        try {
            ChgFormVO chgForm = this.typlmEngineeringChangeService.createChgFormNew(formVO, fileList, descriptionMap);
            TyplmAuditLogUtil.info(chgForm.getOid(), chgForm.getOtype(), LogEventEnum.CRATE_OBJECT);
            TyplmAuditLogUtil.sendCollectInfo();
            return ResponseResult.success(chgForm);
        } catch (Exception var8) {
            AuditLogDO auditLogDO = new AuditLogDO();
            auditLogDO.setObjoid(BigInteger.ZERO);
            auditLogDO.setObjotype(formVO.getEcnOtype());
            auditLogDO.setContaineroid(formVO.getContainerOid());
            auditLogDO.setContainerotype(formVO.getContainerOtype());
            auditLogDO.setTargettype(formVO.getType());
            auditLogDO.setTargetnumber(formVO.getName());
            auditLogDO.setTargetsecuritylabels(formVO.getSecuritylabels());
            auditLogDO.setLifecyclestageoid(formVO.getLifecycleTemplateOid());
            auditLogDO.setLifecyclestageotype(formVO.getLifecycleTemplateOtype());
            auditLogDO.setLifecyclestatekey(formVO.getLifecycleStageKey());
            TyplmAuditLogUtil.errorInfo(LogEventEnum.CRATE_OBJECT, auditLogDO, var8);
            throw var8;
        }
    }

    @PostMapping({"/batchCreateAffectedLinkList"})
    @ApiOperation(
            value = "批量添加受影响对象",
            notes = "批量添加受影响对象",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<BigInteger>> batchCreateAffectedLinkList(@RequestBody AffectedParamDTO affectedParamDTO) {
        ArgumentUtils.checkArgumentNull(affectedParamDTO, "affectedParamVO");
        IdentifierEntity mainObj = affectedParamDTO.getMainObj();
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        List<AffectedObjectDTO> objectList = affectedParamDTO.getObjectList();
        ArgumentUtils.checkArgumentEmpty(objectList, "objectList");
        List<BigInteger> oidList = this.typlmEcAgainstDataService.batchCreateAffectedLinkList(mainObj, objectList);
        oidList.forEach((item) -> {
            this.typlmLogger.info(new CTyEntityBaseDO(item, "ty.inteplm.change.CTyChangeAffectedLink"), LogEventEnum.CRATE_OBJECT);
        });
        return ResponseResult.success(oidList);
    }

    @PostMapping({"/batchQueryAffectedLinkList"})
    @ApiOperation(
            value = "批量查询受影响对象",
            notes = "批量查询受影响对象",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<ECLinkObjDataCommonVO>> batchQueryAffectedLinkList(@RequestBody IdentifierEntity mainObj) {
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        this.typlmLogger.info(new CTyEntityBaseDO(mainObj.getOid(), mainObj.getOtype()), LogEventEnum.VIEW_OBJECT);
        return ResponseResult.success(this.typlmEcAgainstDataService.batchGetAffectedObjectListByOids(Collections.singletonList(mainObj.getOid()), mainObj.getOtype()));
    }

    @DeleteMapping({"/batchDeleteAffectedLinkList"})
    @ApiOperation(
            value = "批量移除受影响对象",
            notes = "批量移除受影响对象",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<Boolean> batchDeleteAffectedLinkList(@RequestBody List<String> linkOidList) {
        ArgumentUtils.checkArgumentNull(linkOidList, "linkOidList");
        this.typlmEcAgainstDataService.batchDeleteAffectedLinkList(linkOidList);
        return ResponseResult.success(Boolean.TRUE);
    }

    @PostMapping({"/batchCreateEndItemLinkList"})
    @ApiOperation(
            value = "批量添加受影响成品",
            notes = "批量添加受影响成品",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<BigInteger>> batchCreateEndItemLinkList(@RequestBody AffectedParamDTO affectedParamDTO) {
        ArgumentUtils.checkArgumentNull(affectedParamDTO, "affectedParamVO");
        IdentifierEntity mainObj = affectedParamDTO.getMainObj();
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        List<AffectedObjectDTO> objectList = affectedParamDTO.getObjectList();
        ArgumentUtils.checkArgumentEmpty(objectList, "objectList");
        List<IdentifierEntity> paramList = (List)objectList.stream().map((item) -> {
            return new IdentifierEntity(item.getOid(), item.getOtype());
        }).collect(Collectors.toList());
        List<BigInteger> oidList = this.typlmChangeEcEndItemLinkService.batchCreateEndItemLinkListAndFilterEndItemPart(mainObj, paramList);
        oidList.forEach((item) -> {
            this.typlmLogger.info(new CTyEntityBaseDO(item, "ty.inteplm.change.CTyChangeEndItemLink"), LogEventEnum.CRATE_OBJECT);
        });
        return ResponseResult.success(oidList);
    }

    @PostMapping({"/batchQueryAffectedEndItemDataList"})
    @ApiOperation(
            value = "查询受影响成品",
            notes = "查询受影响成品",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<ECLinkObjDataCommonVO>> batchQueryAffectedEndItemDataList(@RequestBody IdentifierEntity mainObj) {
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        this.typlmLogger.info(new CTyEntityBaseDO(mainObj.getOid(), mainObj.getOtype()), LogEventEnum.VIEW_OBJECT);
        return ResponseResult.success(this.typlmChangeEcEndItemLinkService.batchGetEndItemDataListByOids(Collections.singletonList(mainObj.getOid()), mainObj.getOtype()));
    }

    @PostMapping({"/batchDeleteEndItemLinkList"})
    @ApiOperation(
            value = "批量移除受影响的成品对象",
            notes = "批量移除受影响的成品对象",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult batchDeleteEndItemLinkList(@RequestBody List<String> linkOidList) {
        this.typlmChangeEcEndItemLinkService.batchDeleteEndItemLinkList(linkOidList);
        return ResponseResult.success();
    }

    @PostMapping({"/getChangeRequestListByIdentifierEntity"})
    @ApiOperation(
            value = "查询对象关联的变更请求集合",
            notes = "查询对象关联的变更请求集合",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<ChgRequestDetailVO>> getChangeRequestListByIdentifierEntity(@RequestBody IdentifierEntity mainObj) {
        this.typlmLogger.info(new CTyEntityBaseDO(mainObj.getOid(), mainObj.getOtype()), LogEventEnum.VIEW_OBJECT);
        return ResponseResult.success(this.typlmChangeRequestService.getChangeRequestListByIdentifierEntity(mainObj));
    }

    @PostMapping({"/updateChangeRequest"})
    @ApiOperation(
            value = "编辑变更请求的属性",
            notes = "编辑变更请求的属性",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<Boolean> updateChangeRequest(@RequestBody TyplmChangeRequestDTO changeRequestDTO) {
        CTyEntityBaseDO cTyEntityBaseDO = this.typlmChangeRequestService.updateChangeRequest(changeRequestDTO);
        this.typlmLogger.info(cTyEntityBaseDO, LogEventEnum.UPDATE_OBJECT);
        return ResponseResult.success(Boolean.TRUE);
    }

    @PostMapping({"/updateRequestFormDataValue"})
    @ApiOperation(
            value = "更新变更请求关联的表单数据",
            notes = "更新变更请求关联的表单数据",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<Boolean> updateRequestFormDataValue(@RequestBody TyplmChangeRequestDTO changeRequestDTO) {
        this.typlmChangeRequestService.updateRequestFormDataValue(changeRequestDTO);
        return ResponseResult.success(Boolean.TRUE);
    }

    @PostMapping({"/batchQueryEcLinkObjByIdentifierEntity"})
    @ApiOperation(
            value = "查询PR/ECR/ECN关联的PR/ECR/ECN（PR获取关联的ECR，ECR获取关联的PR,ECN，ECN获取关联的ECR）",
            notes = "查询PR/ECR/ECN关联的PR/ECR/ECN（PR获取关联的ECR，ECR获取关联的PR,ECN，ECN获取关联的ECR）",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<ECCommonVO>> batchQueryEcLinkObjByIdentifierEntity(@RequestBody IdentifierEntity identifierEntity) {
        ArgumentUtils.checkArgumentNull(identifierEntity, "identifierEntity");
        this.typlmLogger.info(new CTyEntityBaseDO(identifierEntity.getOid(), identifierEntity.getOtype()), LogEventEnum.VIEW_OBJECT);
        return ResponseResult.success(this.typlmChangeRequestService.getEcLinkObjByIdentifierEntity(identifierEntity));
    }

    @PostMapping({"/batchQueryEcInfoByIdentifierEntityList"})
    @ApiOperation(
            value = "根据PR/ECR/ECN对象，批量获取PR/ECR/ECN的详情",
            notes = "根据PR/ECR/ECN对象，批量获取PR/ECR/ECN的详情",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<ECCommonVO>> batchQueryEcInfoByIdentifierEntityList(@RequestBody List<IdentifierEntity> entityList) {
        return ResponseResult.success(this.typlmChangeRequestService.batchQueryEcInfoByIdentifierEntityList(entityList));
    }

    @PostMapping({"/batchCreateEcLinkObjByIdentifierEntity"})
    @ApiOperation(
            value = "批量新增关PR、ECR、ECN间的关联关系（pr和多个ecr的关联关系、ecr和多个pr/ecn的关联关系、ecn和多个ecr的关联关系）",
            notes = "批量新增关PR、ECR、ECN间的关联关系（pr和多个ecr的关联关系、ecr和多个pr/ecn的关联关系、ecn和多个ecr的关联关系）",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<Boolean> batchCreateEcLinkObjByIdentifierEntity(@RequestBody ECLinkParamDTO eCLinkParamDTO) {
        ArgumentUtils.checkArgumentNull(eCLinkParamDTO, "eCLinkParamDTO");
        IdentifierEntity mainObj = eCLinkParamDTO.getMainObj();
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        List<IdentifierEntity> objectList = eCLinkParamDTO.getObjectList();
        ArgumentUtils.checkArgumentEmpty(objectList, "objectList");
        this.typlmChangeRequestService.createEcLinkObjByIdentifierEntity(mainObj, objectList);
        return ResponseResult.success(Boolean.TRUE);
    }

    @PostMapping({"/batchDeleteEcLinkObjByIdentifierEntity"})
    @ApiOperation(
            value = "批量移除PR、ECR、ECN间的关联关系（pr和多个ecr的关联关系、ecr和多个pr/ecn的关联关系、ecn和多个ecr的关联关系）",
            notes = "批量移除PR、ECR、ECN间的关联关系（pr和多个ecr的关联关系、ecr和多个pr/ecn的关联关系、ecn和多个ecr的关联关系）",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult batchDeleteEcLinkObjByIdentifierEntity(@RequestBody ECLinkParamDTO ecLinkParamDTO) {
        ArgumentUtils.checkArgumentNull(ecLinkParamDTO, "ecrLinkParamDTO");
        IdentifierEntity mainObj = ecLinkParamDTO.getMainObj();
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        List<IdentifierEntity> objectList = ecLinkParamDTO.getObjectList();
        ArgumentUtils.checkArgumentEmpty(objectList, "objectList");
        this.typlmChangeRequestService.removeEcLinkObjByIdentifierEntity(mainObj, objectList);
        return ResponseResult.success();
    }

    /** @deprecated */
    @Deprecated
    @PostMapping({"/createEcrLinkData"})
    @ApiOperation(
            value = "ECR和PR/ECN关联关系的创建",
            notes = "ECR和PR/ECN关联关系的创建",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult createEcrLinkData(@RequestBody ECLinkParamDTO ecLinkParamDTO) {
        ArgumentUtils.checkArgumentNull(ecLinkParamDTO, "ecLinkParamDTO");
        IdentifierEntity mainObj = ecLinkParamDTO.getMainObj();
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        List<IdentifierEntity> objectList = ecLinkParamDTO.getObjectList();
        ArgumentUtils.checkArgumentEmpty(objectList, "objectList");
        this.typlmChangeRequestService.createEcrLinkData(mainObj, objectList);
        return ResponseResult.success();
    }

    /** @deprecated */
    @Deprecated
    @PostMapping({"/removeEcrLinkData"})
    @ApiOperation(
            value = "ECR和PR/ECN关联关系的删除",
            notes = "ECR和PR/ECN关联关系的删除",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<Boolean> removeEcrLinkData(@RequestBody ECLinkParamDTO ecLinkParamDTO) {
        ArgumentUtils.checkArgumentNull(ecLinkParamDTO, "ecLinkParamDTO");
        IdentifierEntity mainObj = ecLinkParamDTO.getMainObj();
        ArgumentUtils.checkArgumentNull(mainObj, "mainObj");
        List<IdentifierEntity> objectList = ecLinkParamDTO.getObjectList();
        ArgumentUtils.checkArgumentEmpty(objectList, "objectList");
        this.typlmChangeRequestService.removeEcrLinkData(mainObj, objectList);
        return ResponseResult.success(Boolean.TRUE);
    }

    @PostMapping({"/getListByObjList"})
    @ApiOperation(
            value = "获取PR、ECR的属性、受影响的成品、受影响的对象、参考对象",
            notes = "获取PR、ECR的属性、受影响的成品、受影响的对象、参考对象",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<ChangeEcDataVO> getListByObjList(@RequestBody List<IdentifierEntity> ecLinkList) {
        return ResponseResult.success(this.typlmChangeRequestService.getListByObjList(ecLinkList));
    }

    @PostMapping({"/getChgRequestVOByOid"})
    @ApiOperation(
            value = "根据oid获取变更请求属性",
            notes = "根据oid获取变更请求属性",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<ChgRequestDetailVO> getChgRequestVOByOid(@RequestBody BigInteger oid) {
        ArgumentUtils.checkArgumentBlank(oid, "oid不能为空");
        return ResponseResult.success(this.typlmChangeRequestService.getChgRequestVOByOid(oid));
    }

    /** @deprecated */
    @Deprecated
    @PostMapping({"/getChangeNoticeListByBeforeIdentifierEntity"})
    @ApiOperation(
            value = "根据变更前对象获取变更单",
            notes = "根据变更前对象获取变更单",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<ChgFormVO> getChangeNoticeListByBeforeIdentifierEntity(@RequestBody IdentifierEntity identifierEntity) {
        ArgumentUtils.checkArgumentNull(identifierEntity, "identifierEntity不能为空");
        return ResponseResult.success(this.typlmEngineeringChangeService.queryChgFormByBeforeOrAfterEntity(identifierEntity, Boolean.TRUE));
    }

    /** @deprecated */
    @Deprecated
    @PostMapping({"/getChangeNoticeListByAfterIdentifierEntity"})
    @ApiOperation(
            value = "根据变更后对象获取变更单",
            notes = "根据变更后对象获取变更单",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<ChgFormVO> getChangeNoticeListByAfterIdentifierEntity(@RequestBody IdentifierEntity identifierEntity) {
        ArgumentUtils.checkArgumentNull(identifierEntity, "identifierEntity不能为空");
        return ResponseResult.success(this.typlmEngineeringChangeService.queryChgFormByBeforeOrAfterEntity(identifierEntity, Boolean.FALSE));
    }

    @PostMapping({"/queryChangeNoticeListByChangeObejct"})
    @ApiOperation(
            value = "根据变更前对象（当前版本/最新修订/所有版本）获取变更单",
            notes = "根据变更前对象（当前版本/最新修订/所有版本）获取变更单",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<TyplmChangeObjectDataVO>> queryChangeNoticeListByChangeObejct(@RequestBody TyplmCommonQueryDTO queryDTO) {
        ArgumentUtils.checkArgumentNull(queryDTO, "queryDTO不能为空");
        return ResponseResult.success(this.typlmEngineeringChangeService.queryChangeNoticeListByObejct(queryDTO, Boolean.TRUE));
    }

    @PostMapping({"/queryChangeNoticeListByChangedObejct"})
    @ApiOperation(
            value = "根据变更后对象（当前版本/最新修订/所有版本）获取变更单",
            notes = "根据变更后对象（当前版本/最新修订/所有版本）获取变更单",
            produces = "application/json; charset=utf-8"
    )
    public ResponseResult<List<TyplmChangeObjectDataVO>> queryChangeNoticeListByChangedObejct(@RequestBody TyplmCommonQueryDTO queryDTO) {
        ArgumentUtils.checkArgumentNull(queryDTO, "queryDTO");
        return ResponseResult.success(this.typlmEngineeringChangeService.queryChangeNoticeListByObejct(queryDTO, Boolean.FALSE));
    }
}
